package com.dynamic.data.example.controller;


import com.dynamic.data.permission.annotation.ResourceCheck;
import com.dynamic.data.example.service.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private TaskService taskService;

    @GetMapping("test1")
    public void test1() {
        taskService.list();
    }

    @ResourceCheck
    @GetMapping("test2")
    public void test2() {
        taskService.list();
    }
}
